﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Shop.Model;

namespace Shop.Framework.Page {
    public class CMS_ProductImage:ViewPage {

        public Product ProductItem{ get; set; }
        public List<ProductImage> ImageList { get; set; }
        protected override void OnInit(EventArgs e) {

            try {
                ProductItem = ViewData["Product"] as Product;
                ImageList = ProductItem == null ? new List<ProductImage>() : ProductItem.ProductImages.ToList();
            } catch (Exception ex) {
                throw ex;
            }
            base.OnInit(e);
        }

    }
}
